﻿<Window x:Class="iControl.Windows.AboutWindow"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
	xmlns:properties="clr-namespace:iControl.Properties"
	xmlns:iControl="clr-namespace:iControl.Controls"
	xmlns:ic="clr-namespace:iControl"
	xmlns:iControl1="clr-namespace:iControl"
	xmlns:Microsoft_Windows_Themes="clr-namespace:Microsoft.Windows.Themes;assembly=PresentationFramework.Luna" 
	xmlns:d="http://schemas.microsoft.com/expression/blend/2008" 
	xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
    Title="About - iControl" Height="340" Width="390" AllowsTransparency="True" 
    WindowStyle="None" FontFamily="Tahoma" Opacity="1" Background="#00FFFFFF" Topmost="True" 
	Icon="..\Images\iControlIcon.ico" WindowStartupLocation="CenterScreen"
	FocusManager.FocusedElement="{Binding ElementName=btnOK}"
	mc:Ignorable="d" ResizeMode="NoResize" 	x:Name="window" ShowInTaskbar="True" KeyDown="Window_KeyDown" Loaded="Window_Loaded" xmlns:Microsoft_Windows_Themes1="clr-namespace:Microsoft.Windows.Themes;assembly=PresentationFramework.Aero">
    <Window.Resources>

        <!-- Show Window Animation -->
        <Storyboard x:Key="ShowAnimation">
            <DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="{x:Null}" Storyboard.TargetProperty="(UIElement.Opacity)">
                <SplineDoubleKeyFrame KeyTime="00:00:00" Value="0"/>
                <SplineDoubleKeyFrame KeySpline="0,0,0.5,1" KeyTime="00:00:00.2000000" Value="1"/>
            </DoubleAnimationUsingKeyFrames>
        </Storyboard>

        <!-- XClose Button Style -->
        <Style x:Key="CloseXButtonStyle" TargetType="{x:Type Button}">
            <Setter Property="FocusVisualStyle" Value="{DynamicResource ButtonFocusVisual}"/>
            <Setter Property="Background" Value="{DynamicResource ButtonNormalBackgroundFill}"/>
            <Setter Property="BorderBrush" Value="{DynamicResource ButtonBorder}"/>
            <Setter Property="Foreground" Value="{DynamicResource {x:Static SystemColors.ControlTextBrushKey}}"/>
            <Setter Property="HorizontalContentAlignment" Value="Center"/>
            <Setter Property="VerticalContentAlignment" Value="Center"/>
            <Setter Property="Template">
                <Setter.Value>
                    <ControlTemplate TargetType="{x:Type Button}">
                        <ControlTemplate.Resources>
                            <Storyboard x:Key="MouseOverAnimation">
                                <DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="image" Storyboard.TargetProperty="(UIElement.BitmapEffect).(OuterGlowBitmapEffect.Opacity)">
                                    <SplineDoubleKeyFrame KeyTime="00:00:00.2000000" Value="1"/>
                                </DoubleAnimationUsingKeyFrames>
                            </Storyboard>
                            <Storyboard x:Key="MouseOutAnimation">
                                <DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="image" Storyboard.TargetProperty="(UIElement.BitmapEffect).(OuterGlowBitmapEffect.Opacity)">
                                    <SplineDoubleKeyFrame KeyTime="00:00:00.2000000" Value="0"/>
                                </DoubleAnimationUsingKeyFrames>
                            </Storyboard>
                        </ControlTemplate.Resources>
                        <Image Source="..\Images\Skin\Close.png" x:Name="image">
                            <Image.BitmapEffect>
                                <OuterGlowBitmapEffect GlowColor="#FFFF0000" Opacity="0"/>
                            </Image.BitmapEffect>
                        </Image>
                        <ControlTemplate.Triggers>
                            <Trigger Property="IsMouseOver" Value="True">
                                <Setter Property="BitmapEffect" TargetName="image">
                                    <Setter.Value>
                                        <OuterGlowBitmapEffect GlowColor="#FFFF0000" Opacity="1"/>
                                    </Setter.Value>
                                </Setter>
                            </Trigger>
                        </ControlTemplate.Triggers>
                    </ControlTemplate>
                </Setter.Value>
            </Setter>
        </Style>     
		<!-- Hide Animation -->          
        <Storyboard x:Key="HideAnimation">
        	<DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="{x:Null}" Storyboard.TargetProperty="(UIElement.Opacity)">
        		<SplineDoubleKeyFrame KeyTime="00:00:00.2000000" Value="0"/>
        	</DoubleAnimationUsingKeyFrames>
        </Storyboard>
    	<Style x:Key="ButtonFocusVisual2">
    		<Setter Property="Control.Template">
    			<Setter.Value>
    				<ControlTemplate>
    					<Rectangle Stroke="Black" StrokeDashArray="1 2" StrokeThickness="1" Margin="2" SnapsToDevicePixels="true"/>
    				</ControlTemplate>
    			</Setter.Value>
    		</Setter>
    	</Style>
    	<LinearGradientBrush x:Key="ButtonNormalBackground" EndPoint="0,1" StartPoint="0,0">
    		<GradientStop Color="#F3F3F3" Offset="0"/>
    		<GradientStop Color="#EBEBEB" Offset="0.5"/>
    		<GradientStop Color="#DDDDDD" Offset="0.5"/>
    		<GradientStop Color="#CDCDCD" Offset="1"/>
    	</LinearGradientBrush>
    	<SolidColorBrush x:Key="ButtonNormalBorder" Color="#FF707070"/>
    	<Style x:Key="DonateStyle" TargetType="{x:Type Button}">
    		<Setter Property="FocusVisualStyle" Value="{StaticResource ButtonFocusVisual}"/>
    		<Setter Property="Background" Value="{StaticResource ButtonNormalBackground}"/>
    		<Setter Property="BorderBrush" Value="{StaticResource ButtonNormalBorder}"/>
    		<Setter Property="BorderThickness" Value="1"/>
    		<Setter Property="Foreground" Value="{DynamicResource {x:Static SystemColors.ControlTextBrushKey}}"/>
    		<Setter Property="HorizontalContentAlignment" Value="Center"/>
    		<Setter Property="VerticalContentAlignment" Value="Center"/>
    		<Setter Property="Padding" Value="1"/>
    		<Setter Property="Template">
    			<Setter.Value>
    				<ControlTemplate TargetType="{x:Type Button}">
    					<Image Source="..\Images\Skin\btn_donateCC_LG.gif"/>
    					<ControlTemplate.Triggers>
    						<Trigger Property="IsKeyboardFocused" Value="true"/>
    						<Trigger Property="ToggleButton.IsChecked" Value="true"/>
    						<Trigger Property="IsEnabled" Value="false">
    							<Setter Property="Foreground" Value="#ADADAD"/>
    						</Trigger>
    					</ControlTemplate.Triggers>
    				</ControlTemplate>
    			</Setter.Value>
    		</Setter>
    	</Style>
    </Window.Resources>
    <!-- Window Body -->
    <Border Margin="0,0,0,0" BorderBrush="#CAFFFFFF" BorderThickness="1,1,1,1" CornerRadius="3,3,3,3" Background="#E5317699" MouseLeftButtonDown="DragWindow">
        <Grid>
            <Grid.RowDefinitions>
                <RowDefinition Height="27"/>
                <RowDefinition Height="*"/>
            </Grid.RowDefinitions>
            <Grid.ColumnDefinitions>
                <ColumnDefinition Width="6"/>
                <ColumnDefinition Width="*"/>
            </Grid.ColumnDefinitions>
            <Canvas HorizontalAlignment="Right" VerticalAlignment="Top" Grid.Column="1" Grid.Row="0" d:LayoutOverrides="GridBox" Grid.RowSpan="1" Grid.ColumnSpan="1" Margin="0,0,50,0">
                <Button x:Name="btnCloseX" Style="{DynamicResource CloseXButtonStyle}" Width="44" Height="18" Content="Button" Click="btnCloseX_Click"/>
            </Canvas>
            <Border HorizontalAlignment="Stretch" VerticalAlignment="Stretch" Grid.Column="1" Grid.Row="1" BorderBrush="#FFDAE2E6" BorderThickness="1,1,1,1" CornerRadius="3,3,3,3" Margin="0,0,8,6">
                <Border.Background>
                    <LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
                        <GradientStop Color="#FF9ED5F0" Offset="0"/>
                        <GradientStop Color="#FFB6D1E1" Offset="1"/>
                        <GradientStop Color="#FFACBCC5" Offset="0.504"/>
                    </LinearGradientBrush>
                </Border.Background>
                <Grid x:Name="pnlMain" Margin="8,4,8,8">
                	<Label Margin="8,4.723,0,0" VerticalAlignment="Top" Content="iControl" FontWeight="Bold" Width="62" HorizontalAlignment="Left"/>
                	<Label HorizontalAlignment="Left" Margin="8,32,0,0" VerticalAlignment="Top" Content="Version:" Width="62"/>
                	<Label Margin="74,32,8,0" VerticalAlignment="Top" Content="" x:Name="lblVersion"/>
                	<Label VerticalAlignment="Top" Content="License:" Margin="9,59.277,0,0" d:LayoutOverrides="Height" Width="62" HorizontalAlignment="Left"/>
                	<Button HorizontalAlignment="Right" VerticalAlignment="Bottom" Content="OK" d:LayoutOverrides="Height" Margin="0,0,8,8" Width="67" TabIndex="0" x:Name="btnOK" Click="btnOK_Click"/>
                	<TextBlock Text="For more information, available updates and reporting errors, please visit project web site at codeplex:" Margin="13,113.831,23.87,139.892" TextWrapping="Wrap"/>
                	<Label Content="http://www.codeplex.com/iControl" d:LayoutOverrides="Height" Margin="9,0,86.37,115.409" Foreground="#FF0000FF" TabIndex="1" VerticalAlignment="Bottom"/>
                	<Label Margin="8,82.554,0,0" Content="Developer:" d:LayoutOverrides="Height" VerticalAlignment="Top" Width="62" HorizontalAlignment="Left"/>
                	<Label Margin="74,82.554,98.37,0" VerticalAlignment="Top" Content="Mr.T"/>
                	<Label VerticalAlignment="Top" Content="Microsoft Public License (Ms-PL)" Margin="74,59.277,8,0" HorizontalAlignment="Stretch"/>
                	
                	<TextBlock HorizontalAlignment="Left" Margin="13,0,0,67.959" VerticalAlignment="Bottom" Text="iControl is a free open source project that is developed in personal time. You can show your appreciation and support future development by donating." TextWrapping="Wrap" d:LayoutOverrides="Height"/>
                	
                </Grid>

            </Border>
            <Image HorizontalAlignment="Left" Width="20" Grid.Column="1" Source="..\Images\iControlIcon24.png" Stretch="Fill" VerticalAlignment="Center" Height="20" Margin="0,0,0,0"/>
            <TextBlock HorizontalAlignment="Left" VerticalAlignment="Center" TextWrapping="Wrap" Grid.Row="0" d:LayoutOverrides="HorizontalAlignment, GridBox" Grid.Column="1" Margin="27,0,0,0" Foreground="#FFFFFFFF" FontFamily="Tahoma" x:Name="lblWindowTitle"/>
            <Button HorizontalAlignment="Left" VerticalAlignment="Top" Content="Button" Grid.Column="1" d:LayoutOverrides="HorizontalAlignment, VerticalAlignment" Margin="13,247,0,0" Width="122" Grid.Row="1" Style="{DynamicResource DonateStyle}" Height="47" x:Name="btnDonate" Click="btnDonate_Click" Cursor="Hand"/>
        </Grid>
    </Border>
</Window>
